import java.awt.Desktop;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

import net.oauth.OAuthException;
import oauth.OAuthHandler;
import setup.Config;
import setup.Configuration;


public class MainClass {

	public static void main(String[] p){
		Config config = new Configuration();
		OAuthHandler oauth = OAuthHandler.GETINSTANCE();
		oauth.setConfig(config); 
		
		try {
			oauth.getRequestToken(); 
			//Generate the url
		    URI url = new URI(oauth.getAuthorizationURL()); 
		    //Open url in default browser.
		    Desktop.getDesktop().browse(url);
		    
		    //oauth.requestAccessToken(""); 
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (OAuthException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (URISyntaxException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		
	}
	 
}
 